﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Hyt.Core.Data
{
    public interface IValidModel
    {
        /// <summary>
        /// 验证
        /// </summary>
        void Valid();

        /// <summary>
        /// 是否通过验证
        /// </summary>
        /// <returns></returns>
        bool IsValid();

        /// <summary>
        /// 获取错误摘要
        /// </summary>
        /// <returns></returns>
        string GetErrorSummary(string joinstr);

        /// <summary>
        /// 获取详细错误
        /// </summary>
        /// <returns></returns>
        List<ValidError> GetVerboseError();
    }
}
